package com.ht.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ht.dto.RehabilitationTask;
import com.ht.mapper.RehabilitationTaskMapper;
import com.ht.service.IRehabilitationTaskService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 代齐园
 * @since 2022-05-25
 */
@Service
public class RehabilitationTaskServiceImpl extends ServiceImpl<RehabilitationTaskMapper, RehabilitationTask> implements IRehabilitationTaskService {
    @Resource
    private RehabilitationTaskMapper rehabilitationTaskMapper;

    @Override
    public List<RehabilitationTask> RehabilitationTaskStatus(Long id, String status) {
        QueryWrapper<RehabilitationTask> queryWrapper = new QueryWrapper();
        queryWrapper.eq("user_id",id).eq("status",status);
        List<RehabilitationTask> rehabilitationTasks = rehabilitationTaskMapper.selectList(queryWrapper);
        return rehabilitationTasks;
    }
}
